package com.vuej.core;

import com.vuej.entity.VueFile;

import javax.script.ScriptException;
import java.io.IOException;

/**
 * 将VueFile对象渲染成html片段
 */
public interface VueRender {

    void init(ScriptEnvironment environment) throws Exception;

    void render(ScriptEnvironment environment, VueFile file, VueFileRenderCallback callback) throws Throwable;

    default void render(ScriptEnvironment environment, VueFile file, ThrowVueFileRenderCallback callback) throws Throwable {
        render(environment, file, (VueFileRenderCallback) callback);
    }

}
